package attendance

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type SignRecordRouter struct {
}

// InitSignRecordRouter 初始化 考勤记录 路由信息
func (s *SignRecordRouter) InitSignRecordRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	signreRouter := Router.Group("signre").Use(middleware.OperationRecord())
	signreRouterWithoutRecord := Router.Group("signre")
	signreRouterWithoutAuth := PublicRouter.Group("signre")

	var signreApi = v1.ApiGroupApp.AttendanceApiGroup.SignRecordApi
	{
		signreRouter.POST("createSignRecord", signreApi.CreateSignRecord)   // 新建考勤记录
		signreRouter.DELETE("deleteSignRecord", signreApi.DeleteSignRecord) // 删除考勤记录
		signreRouter.DELETE("deleteSignRecordByIds", signreApi.DeleteSignRecordByIds) // 批量删除考勤记录
		signreRouter.PUT("updateSignRecord", signreApi.UpdateSignRecord)    // 更新考勤记录
	}
	{
		signreRouterWithoutRecord.GET("findSignRecord", signreApi.FindSignRecord)        // 根据ID获取考勤记录
		signreRouterWithoutRecord.GET("getSignRecordList", signreApi.GetSignRecordList)  // 获取考勤记录列表
	}
	{
	    signreRouterWithoutAuth.GET("getSignRecordPublic", signreApi.GetSignRecordPublic)  // 获取考勤记录列表
	}
}
